local m = require('utils.vim')

-- Show cursor line only in active window
m.autocmd({ 'InsertLeave', 'WinEnter' }, {
	group = m.augroup('auto_cursorline_show'),
	callback = function(event)
		if vim.bo[event.buf].buftype == '' then
			vim.opt_local.cursorline = true
		end
	end,
})
m.autocmd({ 'InsertEnter', 'WinLeave' }, {
	group = m.augroup('auto_cursorline_hide'),
	callback = function(_)
		vim.opt_local.cursorline = false
	end,
})

--EOP
